//鍒ゆ柇鏄惁涓虹┖鍊�
<?php
$a = array ('test' => 1, 'hello' => NULL);
    var_dump( isset ($a['test']) );
    var_dump( isset ($a['hello']) );
    var_dump( isset ($a['hi']) );
?>
//灏嗗瓧绗︿覆缈昏浆
<?php 
$str = "abcdef";
for ($i=1; $i<=strlen($str); $i++){
echo substr($str , -$i , 1);
}
?>
//鎴彇瀛楃涓茬殑涓�閮ㄥ垎
<?php 
$str = "abcdef";
echo substr($str,2,5);
?>

<?php  
$a = array('name' => 'Fred', 'age' => '15', 'wife' => 'Wilma');
print_r($a); 
?>

<?php 
$b = "hello";
print($b);
?>

 <?php 
 $w = array($b =201,$r=1000,$y=$b<$r?4:5);
  print_r($w);
?>
<?php 
echo strpos("Hello world!","world"); 
?>

<?php
$cars=array("Volvo","BMW","Toyota");
echo count($cars);
?>

<?php
$x=array("one","two","three");
foreach ($x as $value)
{
echo $value . "<br>";
}
?>

<?php
function writeName($fname,$punctuation)
{
echo $fname . " Refsnes" . $punctuation . "<br>";
}

echo "My name is ";
writeName("Kai Jim",".");
echo "My sister's name is ";
writeName("Hege","!");
echo "My brother's name is ";
writeName("St氓le","?");
?>

<?php
function add($x,$y)
{
$total=$x+$y;
return $total;
}

echo "1 + 16 = " . add(1,16);
?>

<?php
echo '杩欐槸绗� " '  . __LINE__ . ' " 琛�';
?>

<?php
echo '璇ユ枃浠朵綅浜� " '  . __FILE__ . ' " ';
?>

<?php
echo '璇ユ枃浠朵綅浜� " '  . __DIR__ . ' " ';
?>
